(function($){
    $.extend($.fn, {
		posfixed: function(configSettings){
            var settings = {
            	direction:"top",
            	type:"while",
            	hide:false,
				distance:0
			};			
			$.extend(settings, configSettings);

			//initial
			if($.browser.msie&&$.browser.version==6.0){
				$("html").css("overflow","hidden");
				$("body").css({
					height:"100%",
					overflow:"auto"
				});
			}
			
			var obj = this;
			var initPos = $(obj).offset().top;
			var initPosLeft = $(obj).offset().left;
			var anchoredPos = settings.distance;

			if(settings.type=="while"){
				if($.browser.msie&&$.browser.version==6.0){
					$("body").scroll(function(event) {
						var objTop = $(obj).offset().top - $("body").scrollTop();
						if(objTop<=settings.distance){
							$(obj).css("position","absolute");
							$(obj).css("top",settings.distance+"px");
							$(obj).css("left",initPosLeft+"px");
						}
						if($(obj).offset().top<=initPos){						
							$(obj).css("position","static");
						}
					});
					
				}else{
					$(window).scroll(function(event) {

						if(settings.direction == "top"){
							var objTop = $(obj).offset().top - $(window).scrollTop();
						
							if(objTop<=settings.distance){
								$(obj).css("position","fixed");
								$(obj).css(settings.direction,settings.distance+"px");
								
							}
							if($(obj).offset().top<=initPos){
								$(obj).css("position","static");
							}
						}else{
							var objBottom = $(window).height() - $(obj).offset().top + $(window).scrollTop() - $(obj).outerHeight() ;
							
							if(objBottom<=settings.distance){
								
								$(obj).css("position","fixed");
								$(obj).css(settings.direction,settings.distance+"px");
								
							}
							if($(obj).offset().top>=initPos){
								$(obj).css("position","static");
							}
						}
						


					});
				}
			}
			
			if(settings.type=="always"){
				if($.browser.msie&&$.browser.version==6.0){
					if(settings.hide){
						$(obj).hide();
					}
					$("body").scroll(function(event) {
						if($("body").scrollTop()>300){
							$(obj).fadeIn(200);
						}else{
							$(obj).fadeOut(200);
						}
					});
					$(obj).css("position","absolute");
					$(obj).css(settings.direction,settings.distance+"px");
					if(settings.tag!=null){
						if(settings.tag.obj!=null){
							if(settings.tag.direction=="right"){
								$(obj).css("left",(settings.tag.obj.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.obj.tag.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								});
							}else{
								console.log(settings.tag.obj.offset().left-settings.tag.obj.width()-settings.tag.distance);
								$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								});
							}
							
						}else{
							$(obj).css(settings.tag.direction,settings.tag.distance+"px");
						}
					}

				}else{
					if(settings.hide){
						$(obj).hide();
					}
					$(window).scroll(function(event) {
						if($(window).scrollTop()>300){
							$(obj).fadeIn(200);
						}else{
							$(obj).fadeOut(200);
						}
					});
					var objLeft = $(obj).offset().left;

					$(obj).css("position","fixed");
					$(obj).css(settings.direction,settings.distance+"px");
					if(settings.tag!=null){
						if(settings.tag.obj!=null){
							if(settings.tag.direction=="right"){
								$(obj).css("left",(settings.tag.obj.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.obj.tag.offset().left+settings.tag.obj.width()+settings.tag.distance)+"px");
								});
							}else{
								console.log(settings.tag.obj.offset().left-settings.tag.obj.width()-settings.tag.distance);
								$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								$(window).resize(function(){
									$(obj).css("left",(settings.tag.obj.offset().left-$(obj).outerWidth()-settings.tag.distance)+"px");
								});
							}
							
						}else{
							$(obj).css(settings.tag.direction,settings.tag.distance+"px");
						}
					}
				}
				
				
				
			}
			
			
		}
	});
	
	
})(jQuery);


$(function(){	
	$(".con-two").hover(function(){
		$(this).find(".txt-two").css("display","block");
		},function(){
			$(this).find(".txt-two").css("display","none");
	});	

});
$(function(){

	$(".whywm ul li").mouseover(function(){
		$(this).css({
			background:"url(images/tubj2.jpg)"
			 });
		$(this).find(".tub1").css({
			background:"url(images/tubb1.png)"
			 });
	    $(this).find(".tub2").css({
			background:"url(images/tubb2.png)"
			 });
		$(this).find(".tub3").css({
			background:"url(images/tubb3.png)"
			 });
		$(this).find(".tub4").css({
			background:"url(images/tubb4.png)"
			 });
	    $(this).find(".whytxt").css({
			color:"#FFF"
			 });
		$(this).find(".xaxi").css({
			"background-color":"#FFF"
			 });
		$(this).find(".whynr").css({
			color:"#FFF"
			 });
		$(this).find(".xxnr").css({
			background:"url(images/xianxi1.png)",
			color:"#FFF"
			 });
          
		});
		$(".whywm ul li").mouseout(function(){
		$(this).css({
			background:"url(images/tubj1.jpg)"
			 });
		$(this).find(".tub1").css({
			background:"url(images/tub1.png)"
			 });
		$(this).find(".tub2").css({
			background:"url(images/tub2.png)"
			 });
		$(this).find(".tub3").css({
			background:"url(images/tub3.png)"
			 });
	    $(this).find(".tub4").css({
			background:"url(images/tub4.png)"
			 });
	    $(this).find(".whytxt").css({
			color:"#727a83"
			 });
		$(this).find(".xaxi").css({
			"background-color":"#cccccc"
			 });	
		$(this).find(".whynr").css({
			color:"#999999"
			 });
		$(this).find(".xxnr").css({
			background:"url(images/xianxi.png)",
			color:"#727a83"
			 });	 
		});
});

$(document).ready(function($){

	var offset = 20,

		offset_opacity = 1200,

		scroll_top_duration = 700,

		$back_to_top = $('.cd-top');


	$(window).scroll(function(){
		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
		if( $(this).scrollTop() > offset_opacity ) { 
			$back_to_top.addClass('cd-fade-out');
		}
	});

	$back_to_top.on('click', function(event){
		event.preventDefault();
		$('body,html').animate({
			scrollTop: 0 ,
		 	}, scroll_top_duration
		);
	});

});

$(document).ready(function(){
  $(".prelative").mouseover(function(){
  $(".mp_qrcode").show();
  });
  $(".prelative").mouseout(function(){
  $(".mp_qrcode").hide();
  });
});

$(document).ready(function(){
  $(".min").mouseover(function(){
 
  $(this).find(".s1").css({
	  right:"58px"
	  }).show();
  $(this).find(".s2").css({
	  top:"1px",
	  right:"58px"
	  }).show();
  $(this).find(".s3").css({
	  top:"2px",
	  right:"58px"
	  }).show();
  $(this).find(".s4").css({
	  top:"3px",
	  right:"58px"
	  }).show();
  $(this).find(".s5").css({
	  top:"4px",
	  right:"58px"
	  }).show();
  $(this).find(".s6").css({
	  top:"5px",
	  right:"58px"
	  }).show();
  $(this).find(".s7").css({
	  top:"6px",
	  right:"58px"
	  }).show();
  });
  
  $(".min").mouseout(function(){
  $(this).find(".s1").hide();
  $(this).find(".s2").hide();
  $(this).find(".s2").hide();
  $(this).find(".s3").hide();
  $(this).find(".s4").hide();
  $(this).find(".s5").hide();
  $(this).find(".s6").hide();
  $(this).find(".s7").hide();
  });
});
$(document).ready(function(){
  $(".kis").mouseover(function(){
 
  $(this).find(".s8").css({
	  right:"58px"
	  }).show();
  $(this).find(".s9").css({
	  right:"58px"
  	  }).show();
  $(this).find(".s10").css({
	  top:"2px",
	  right:"58px"
	  }).show();

  });
  
  $(".kis").mouseout(function(){
  $(this).find(".s8").hide();
  $(this).find(".s9").hide();
  $(this).find(".s10").hide();

  });
});